Skip to main content

All Questions

1vote
2answers
858views

Printing the column names using the output of "df -h" (macOS)

I am trying to: Print the output of the command "df -h" (in macOS),but only with /dev/disk* as ouptut. I used the following command: df -h|awk -F"\t" '/\/[d-v]{3}\/[a-z]{4}[0-9]{1}[s-t]{1}[0-9]{1}/{...
swasti bhushan deb's user avatar
14votes
3answers
10kviews

sum all numbers from "du"

We want to calculate the first numbers that we get from du du -b /tmp/* 6 /tmp/216c6f99-6671-4865-b8bc-7205f5388752_resources 668669 /tmp/hadoop7887078727316788325.tmp 6 /tmp/hadoop-hdfs ...
yael's user avatar
  • 13.9k
0votes
1answer
120views

how to verify at least XG free space on /var

we have the following df -h output [root@trump var]# df -h | grep "/var" /dev/mapper/vg-lvm_var 101G 85G 17G 84% /var how to verify at least 10G free space on /var in bash/awk/perl one liner ...
yael's user avatar
  • 13.9k
1vote
1answer
1kviews

Compare two files for greater than value

I Have a request to alert usage of disk every 30 minutes, The thing is recent output should check old alert to avoid to send same alert again and again. #!/bin/bash #export maillist=mailxxx@gmail....
Tom's user avatar
  • 11
1vote
2answers
4kviews

Using df and trying to awk a specific column

Among other problems with this script I am trying to make (this is the first unix/linux script I have ever made), I am trying to use df to get the % of disk space used and email it to the root. Our ...
Jeremy's user avatar

close